package com.ty.day6;

import java.io.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/29 11:14
 */
public class DateStreamDemo01 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("E:\\文件夹\\java\\1\\2.txt");
        FileInputStream fis = new FileInputStream("E:\\文件夹\\java\\1\\2.txt");
        DataOutputStream dos = new DataOutputStream(fos);
        DataInputStream dis = new DataInputStream(fis);
        dos.writeInt(113);
        dos.writeBoolean(false);
        dos.write("asd".getBytes());
        dos.flush();
        System.out.println(dis.readInt());
        System.out.println(dis.readBoolean());
        System.out.println(dis.read());
        dos.close();
        fis.close();
    }
}
